<?php
defined('IN_ADMIN') or exit('No permission resources.');
$show_dialog = 1;
include $this->admin_tpl('header', 'admin');
?>
  <style>
.tableK { font-size: 14px; border-spacing: 0px; border-bottom: 1px solid #999; width: 100%; }
.tableK tr th{ background-color: #CFDBEC; font-weight: bold; width: 160px; text-align: right; border-right: none; }
.tableK tr { }
.tableK td { border: 1px solid #999; border-bottom: none; padding: 4px 6px; }
.tableK td input[type='text'] { padding: 2px 4px; width: 300px; border: 1px solid #999; }
.tableK td textarea { border: 1px solid #999; }
.buttonpanle { width: 70%; text-align: center; margin-top: 4px; }
.mf-body-title { height: 40px; line-height: 40px; font-weight: bold; padding-left: 20px; }
</style>
<script language="javascript" type="text/javascript" src="<?php echo JS_PATH;?>formvalidator.js" charset="UTF-8"></script>
<script language="javascript" type="text/javascript" src="<?php echo JS_PATH;?>formvalidatorregex.js" charset="UTF-8"></script>
<script type="text/javascript">
<!--
$(function(){
	$.formValidator.initConfig({formid:"frmadd",autotip:true,onerror:function(msg,obj){window.top.art.dialog({content:msg,lock:true,width:'200',height:'50'}, function(){this.close();$(obj).focus();})}});
	$("#name").formValidator({onshow:"请输入类型名称",onfocus:"请输入类型名称"}).inputValidator({min:1,max:100,onerror:"输入名称格式错误"});
})
//-->
</script>
  <div>
	<form action="/index.php?m=hchassorttype&c=crud&a=mylist"  method="post" name="frmadd" id="frmadd">
		<table class="tableK" >
	          <tr>
	            <th>类型名</th>
	            <td>
                    <input type="text" name="item[name]" id="name"  class="input-text" ></input>
                    <input type="hidden" name="action" value="add" />
                </td>
	          </tr>
	          <tr>
	            <th>备注</th>
	            <td><input type="text" name="item[remark]" id="remark"  class="input-text" ></input></td>
	          </tr>
	          <tr>
	            <th>上一级</th>
	            <td>
                    <select name="item[parent_id]" id="parent_id">
                        <option>请选择</option>
                        <?php
                        foreach ($lists as $li){
                            $select = "";
                            echo "<option value='" . $li['id'] . "' " . $select  . " >".$li["name"]."</option>";
                        }
                        ?>
                    </select>
                </td>
	          </tr>
	          <tr>
	          	<td colspan="3">
	          		<input type="submit" name="submit" id="submit" value="提交" />
	          	</td>
	          </tr>
	          </tbody>
	      </table>
      </form>
</div>
</body>
</html>